﻿@model MvcAtletIS.Models.Competitors

@{
    ViewBag.Title = "Členovia";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Editovať člena: @ViewBag.Clubs.Name</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Detaily</legend>

        @Html.HiddenFor(model => model.ID)

        <div class="editor-label">
            @Html.LabelFor(model => model.Firstname)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Firstname)
            @Html.ValidationMessageFor(model => model.Firstname)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Surname)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Surname)
            @Html.ValidationMessageFor(model => model.Surname)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Birthdate)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Birthdate)
            @Html.ValidationMessageFor(model => model.Birthdate)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Sex)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Sex)
            @Html.ValidationMessageFor(model => model.Sex)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ClubId, "Klub")
        </div>
        <div class="editor-field">
            @Html.DropDownList("ClubId", null, String.Empty, new { @style = "width: 400px;" })
            @Html.ValidationMessageFor(model => model.ClubId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CountryId, "Krajina")
        </div>
        <div class="editor-field">
            @Html.DropDownList("CountryId", null, String.Empty, new { @style = "width: 400px;" })
            @Html.ValidationMessageFor(model => model.CountryId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Competitor)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Competitor)
            @Html.ValidationMessageFor(model => model.Competitor)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CoachClass)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CoachClass)
            @Html.ValidationMessageFor(model => model.CoachClass)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.RefereeClass)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.RefereeClass)
            @Html.ValidationMessageFor(model => model.RefereeClass)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Active)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Active)
            @Html.ValidationMessageFor(model => model.Active)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Sync)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Sync)
            @Html.ValidationMessageFor(model => model.Sync)
        </div>

        <p>
            <input type="submit" value="Uložiť" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Naspäť na prehľad členov", "Index", new { clubId = ViewBag.Clubs.ID })
</div>
